﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

namespace CSharpAlgorithm
{
    class GrandChallenge
    {
        public GrandChallenge()
        {
            int testCase = Int32.Parse(TestConsole.ReadLine());
            while (testCase-- > 0)
            {
                string[] input = TestConsole.ReadLine().Split(' ');
                int cameraCount = Int32.Parse(input[0]);
                int pointCount = Int32.Parse(input[1]);
                int[] pointList = new int[pointCount];
                input = TestConsole.ReadLine().Split(' ');
                for (int i = 0; i < pointCount; i++)
                {
                    pointList[i] = Int32.Parse(input[i]);
                }
                //모든 포인트간의 거리 구하기
                int[,] board = new int[pointCount, pointCount];
                for (int i = 0; i < pointCount; i++)
                {
                    board[0, i] = pointList[i] - pointList[0];
                }
                for (int i = 1; i < pointCount; i++)
                {
                    for (int j = i + 1; j < pointCount; j++)
                    {
                        board[i, j] = board[i - 1, j] - board[i - 1, i];
                    }
                }
                Console.WriteLine("");
            }
        }
    }
}
